<?php
class notificaComponent extends Component{
    protected $listActions = array('[X]' => "apagar");
    
    public    $list_in_table = true;
    public function format_notificacao_notifica_url($url, $dados){
        return $this->Html->MakeLink($url, 'Acesse');
    }
    
    public function ajaxCheck(){
        $this->LoadModel('usuario/login', 'uobj');
        if(!$this->uobj->isLoged()) return ;
        $jslink = $this->Html->getLink('static/js/lib/notificacao/notify');
        $this->Html->LoadJs($jslink);
        $link = $this->Html->getLink('notificacao/notifica/count');
        $this->Html->LoadJQueryFunction("
            var title = document.title;
            CheckMessages(title, '$link');
            //setInterval(function(){CheckMessages(title, '$link')}, 62000);
        ");
    }
}
?>